<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class UpdateVfilesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('vifiles', function (Blueprint $table) {
            $table->integer('sp_id')->default(0)->nullable()->unsigned()->comment('SP服务商ID')->change();
            $table->integer('resolution_id')->default(2)->nullable()->unsigned()->comment('清晰度 1 low低清，2 std标清，3 hd 高清，4 超清，5 4k')->change();
            $table->integer('vfileext_id')->default(1)->nullable()->unsigned()->comment('文件类型 默认为1，1 TS，2 3GP，3 flv，4 MP4，5 wmv，6 mp3')->change();
            $table->integer('duration')->nullable()->unsigned()->comment('节目时长')->change();
            $table->text('href')->nullable()->comment('访问href')->change();
            $table->string('short_desc')->nullable()->comment('简介')->change();
            $table->integer('type')->default(1)->nullable()->comment('文件类型 1:正片 2片花 3预告 4其他')->change();
            $table->string('alias_name')->nullable()->change();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('vifiles', function (Blueprint $table) {
            //
        });
    }
}
